package com.nacosprovider;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class NacosProviderController {

    @Value("${server.port}")
    String port;

    @GetMapping("/hi")
    public String hi(@RequestParam(value = "name",defaultValue = "Nacos服务端消息",required = false)String name){
        return "服务端【"+port+"】提供消息，客户端传过来的name= "+name;
    }

}
